home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / c / sozobon / sozlib15.zoo / sozdistr / doc / xdlibs.chg < prev   
Encoding:
Text File  |  1995-09-10  |  18.1 KB  |  477 lines

  1. -----------------------------------------------------------
  2. DLibs -> XDlibs
  3.  
  4. To identify and include the XdLibs version in your program you have
  5. access to following variables:
  6. extern short _xdlibs;    /* version number as BCD (print hex value)    */
  7. extern char _xdlibs_date[]:    /* modification date string    */
  8. extern char __Ident_lib[];    /* a standard ident string    */
  9.  
  10. last modifications by Volker Seebode
  11.  
  12. version 1.13 95/09/10
  13.     added function prototypes
  14.     full support of 32-bit integer and sizeof() returning type unsigned long
  15.     new global var
  16.         short ___intsize;
  17.       holds value of sizeof(int)
  18.  
  19. last modifications by jerry g geiger
  20.  
  21. version 1.11
  22.     __FWRT_BIN__ ist TRUE if the $UNIXMODE tag 'b' is defined
  23.     new switch __FWRT_DEV_BIN__ for device streams
  24.     new macro fpending(FILE *fp) and changes (therefore and others)
  25.       in stdio functions 
  26.     fopenp() changed for any path searches and $UNIXMODE support.
  27.     exec...() functions supported now, fork() and vfork()
  28.       implemented
  29.     new _unixmode_root() _unixmode_slash() and _unixmode_bin()
  30.      functions 
  31.     [p]findfile() and fullpath() functions now use
  32.       '/' and 'r<x>' tags from $UNIXMODE env variable
  33.       see _unixmode...() functions
  34.     debug functions / startup code changed:
  35.       now cc forces ld to link new 'except.a' library if '-X'
  36.       option is set. If a signal() function is available 
  37.       the debug code uses it instead of trap vectors.
  38.       The message is written via Salert() function if posible, if
  39.       not to stderr.
  40.  
  41. version 1.10
  42.     MiNT support changed - most functions try calls instead
  43.       of version number checking
  44.     osbind.h changed, new tosbind.h, new file.h and filesys.h
  45.     osbind.h includes tosbind.h and mintbind.h now
  46.     mintbind.h supports MiNT 1.12
  47.     utime() can touch directories now
  48.     fopen()/open() now faster if MiNT is running
  49.     various changes to unistd functions & some more exist now
  50.     bugfixes: string functions
  51.  
  52. version 1.09
  53.     some modules moved (linking system.o caused some errors)
  54.     access to char *_extensions and char _spawn_ext[] enabled
  55.     char * _getsuffixes() now documented function
  56.     utime() fixed, still can't handle directories
  57.     fstat(), lstat() added
  58.  
  59. version 1.07
  60.     new startup modules
  61.     
  62.     support of 8 Byte IEEE doubles; printf() only handles double
  63.         floating point arguments!, scanf() double and float args
  64.         you will need an hcc version > 2.24 (2.00x24) and
  65.         corresponding top (2x22) and jas (2x10) versions!
  66.  
  67.     bugs fixed in:
  68.     strtol(), strtoul(), spawn...(), fgetc() device mode
  69.  
  70.     changes:
  71.     crtinit() switches to MiNT domain if MiNT is running cause the
  72.         library functions need this!
  73.  
  74.     chdir()  now checks Gemdos device (drive char)
  75.  
  76.     fgetw()..., fputw()... replace the former putw() etc functions
  77.  
  78.  
  79. Wed Oct 12 1994
  80. version 1.06
  81.     
  82.     function 'wild()' - FNRE matching tests
  83.         is now moved to 'libextra.a'; And a variable 
  84.     'char __EXCLUDE_CHAR__' exists to specify the not character
  85.         for classes (default is '^').
  86.  
  87.     now two 'libc' files, one with floating point calculations support
  88.     ('libc.a') and an integer only library ('libci.a', like previous 
  89.     libc.a' files).
  90.     This is for soon there will be an hcc available with full IEEE
  91.     support, and usually the 'libc.a' file contains all functions used
  92.     for floating point support.
  93.     cc will use the right library according to '-f' or '-lm' switches!
  94.  
  95.     xgemfast.h has changed, for hcc 2.00x23 now supports std bitfields!
  96.     you will have to recompile all sources at once if you use
  97.     hcc v2.00x23. 
  98.     
  99.     the startup codes now support another cookie as variable: 
  100.     'short _magx', with the version number found or 0 if not available.
  101.  
  102.     bug fixed in tempnam() and stdio.h (exist() == !access())
  103.  
  104. version 1.05
  105. Jul 19 1994
  106. (official release)
  107.         new file names: xdlibs library are now:
  108.     xdlibs\libc.a, xdlibs\libextra.a
  109.  
  110.     div(), ldiv() implemented
  111.     abs(), labs() implemented as functions, 
  112.         macros are now: _abs() and _labs()
  113.  
  114. version 1.04
  115. Jul 06 1994
  116.     bugs fixed in fread()
  117.  
  118. Jun 27 1994
  119. changed:
  120.     creat.o , spawn3.o 
  121.     spawn0.o (new, to reduce linking of unnecessary functions)
  122.  
  123.     fsize.o, now size.o, (function fsize() now called size(), cause f...
  124.         functions refer to FILE struct handling functions)
  125.  
  126.     pfindfile.o   (path searches now always - if no root path specified)
  127.  
  128.     bug in findfile.o fixed 
  129.  
  130. Jun 21 1994
  131.     bugs fixed in creat.o,
  132.  
  133.     changed: startup modules, getenv.o, initeargs.o
  134.     new: crtinit.o , consiste.o
  135.         setup some variables and check buggy
  136.         environment: new Variable: 'int __ASSUME_CONSITENT_ENV__'
  137.         if != 0 (default) it is assumed that environment is
  138.         consistent (i.e. if fist is correct all other
  139.         strings are assumed to be correct, too)
  140.     new: strictly.o
  141.         new Variable 'int __STRICTLY_ARGV__'
  142.         if != 0 only ARGV commandlines using 127 as length
  143.         byte get used. (some programs don't do so - gulam!)
  144.         default is 0 - FALSE.
  145.     changed: main.o
  146.         handling of stderr improved:
  147.         now uses unchanged stderr (handle 2) if ARGV method
  148.         was used calling this program, too.
  149.  
  150. version 1.03
  151. Jun 17 1994
  152.     line buffering implemented
  153.     some functions changed:
  154.     access() returns TRUE for error now (ANSI/POSIX)
  155.         handles executable files now
  156.         handles UNIX like filesystems (MiNT!) now
  157.     stat(), chmod(), create(), open() (MiNT extensions)
  158.         some constants changed, structure stat changed!!
  159.     system() runs only with a shell now! don't uses _shell_p if
  160.         MiNT is running
  161.     _ttty() device input now emulates a std tty driver, never
  162.         called if MiNT is running
  163.     time functions splitted and changed!
  164.         rawtime encoding changed: you can compare time_t rawtime
  165.         values now, younger will be greater always!
  166.     i/o buffered/FILES are flushed on exit again
  167.         fgetc.o, main.o
  168.     spawn functions:
  169.         forkl...() removed;
  170.         new spawn functions (names like old forkl...() functions
  171.         wait() removed;
  172.     lrealloc() implemented
  173.     fputs()    will add a newline if there was none;
  174.     fread() and fwrite() work according to openmode (binary or text)
  175.     __FRW_BIN__ and __FWRT_BIN__ implemented (changes the newline
  176.         translating independent from open mode)
  177.     __ident_lib implemented (char __ident_lib[]).
  178.         to identify the XdLibs version you can type:
  179.         'ar p [path]xdlibs.a xdlibs.o' in your shell
  180.         and you can read some strings from this object module.
  181.     setvbuf() works as provided by standard now;
  182.  
  183. version 1.02
  184. Fri Apr 15 1994
  185.  
  186. Getcookie bug (testing pointer didn't work correctly) fixed.
  187.  
  188.  
  189. Sat Mar 5 1994
  190.  
  191. new startup codes, new minimum.h, _mint flag now available
  192. new function GetMiNT(); is a dummy in programms using '*_s.o' and not
  193. minimum.h.
  194. (see xdlibs.txt for this)
  195.  
  196. The wrong _main() function in XDlibs is replaced.
  197.  
  198. unsigned int sleep(unsigned int seconds)
  199.     changed to standard (unsigned); now with MiNT feature (using signal)
  200.  
  201. void usleep(unsigned long usec)
  202.     changed to standard (unsigned long micro seconds), MiNT feature
  203.     (using Fselect(), so only milliseconds are taken into account!)
  204.     This is not compatible with old implementation, but I think hardly
  205.     anyone has used it.
  206.  
  207. clock_t clock()    now returns the CLK_TCKs since progamm start, as provided by
  208.     standard, this works only if a '*_s.o' startup code was used.
  209. So I had to make some changes in extended.lib, too.
  210.  
  211. In stddef.h a macro _XDLIBS is defined with the expected version number
  212. of the XDLIBS library. There is an 'int _xdlibs' in xdlibs.a, with the
  213. current version number. Highbyte is version, lowbyte is revision
  214.  
  215. new function
  216.     long teststack()
  217.     returns the long number of Bytes unused stacksize. This may help
  218.     you to calculate an appropriate _STKSIZ value. 
  219.     The accapp_s.o statup code has implemented this function, cause only
  220.     the startup code itself knows where it's stack is located at
  221.     runtime. 
  222.     
  223.  
  224. version 1.01
  225. Fri Feb 25 1994
  226.  
  227. some major changes with include files: stdlib.h, stdio.h unistd.h
  228. types.h is generally included with stddef.h now
  229. stddef.h is included by stdlib.h and stdio.h
  230. !!size_t is unsigned int now!! 
  231. there is still a lot of work to do with header files and library stuff.
  232.  
  233.  
  234. int system(char *command)
  235.     returns now TRUE if command is NULL and a shell is available
  236.     makes use of new ARGV scheme (empty args), tokenizes command
  237.     with quoted (',",`) strings as a shell expects it
  238.  
  239. int chdir(char *path)
  240.     A drive letter can be specified and will change the drive
  241.     first. 
  242.  
  243. int forkl...
  244.     names and parameters now really according to exec... calls
  245.     IF YOU USED THIS FUNCTIONS SEE DOCUMENTS!!!!!!
  246.     Now they return the childs return value!!!
  247.     The functions use now ATARI's new ARGV scheme, the current
  248.     (putenv(), modified) environment.
  249.     errno and wait() will help you with some informations about
  250.     the terminated or never created child.
  251.  
  252. char *getenv(char *var)
  253.     bug fixed
  254.  
  255. int putenv(char *entry)
  256.     completely rewritten, now it works correct, I hope.
  257.  
  258. char *strncat(char *dest, char source, int len)
  259.     bug fixed
  260.  
  261. int atexit(void (*fnc)())
  262.     you can store up to 32 functions now, called by exit while program
  263.     termination
  264.  
  265.  
  266. calling main:
  267.  
  268. _main() If main returns the value is passed to exit.
  269.     stderr now is filehandle 2 if $STDERR ist set;
  270.  
  271. _initargs() now retrives commandlines from Environment
  272.     (ARGV scheme), including empty arguments
  273.  
  274.  
  275. -----------------------------------------------------------
  276. Änderungen von Holger Weets, Christian Wempe & Frank Specht
  277. Anmerkung: an dieser Datei wird nur gelegentlich, und wenn,
  278.            dann in aller Eile geaendert, es koennen somit
  279.            einander widersprechedne Teile enthalten sein
  280. -----------------------------------------------------------
  281. - Die Funktion 'crystal' wurde entfernt, da sie bei Verwendung der GEMFAST-
  282.   Bibliothek nicht notwendig ist.
  283. - einige weniger oft verwendete Funktionen aus den XDLibs wurden in eine
  284.   neue Bibliothek verschoben, so dass die XDLibs jetzt kuerzer sind
  285.   (besonders fuer Ramdisk-Benutzer interessant) und das Linken schneller
  286.   ist (der Linker hat weniger Symboltabellen zu untersuchen)
  287.   Es sind dies u.a.:
  288.    system, exec, die *fork* Funktionen, die Sortier-Funktionen, entab,
  289.    detab, ostrap, die Profiling-Sachen, der Online-Debugger etc.
  290.   Diese neue Bibliothek trägt den Namen 'EXTENDED.LIB'
  291.  
  292.  
  293. Einige Funktionen wurden in Assembler neu implementiert:
  294. --------------------------------------------------------
  295.    STRSTR   STRLEN   STRCPY   STRNCPY  STRNCAT  STRUPR   STRCMP
  296.    STRNCMP  STRPOS   STRRPOS  STRRCHR  MEMMOVE  STRCAT   STRLWR
  297.    ATOI     ATOL     STRNICMP STRICMP  BZERO    STRDUP   CTLCNV
  298.    STRADJ   MEMCHR   MEMCMP   MEMICMP  MEMSET   STRSET   STRNSET
  299.    STRPCPY  MEMCCPY  LMEMMOVE SUBSTR   SUBNSTR  STRTOK   STRTRIM
  300.    ITOA     LTOA     ULTOA    STRSPN   STRISTR  FPRINTF  VFPRINTF
  301.    PRINTF   VPRINTF  STRRPL   STRIRPL  QSORT    HSORT    SWAB
  302.    LMEMCPY  STRREV   STRRPBRK STRPBRK  STRCSPN
  303.  
  304. Autoren: Christian Wempe, Amiga & Holger Weets, Atari;
  305.  
  306. Anmerkungen: - Für qsort() wird KEIN Buffer mehr benötigt, daß Anlegen der
  307.                globalen Variablen '_qbuf' entfällt somit.
  308.              - lmemcpy & memcpy   sind eine Funktion mit 2 Einstiegspunkten
  309.              - lmemmove & memmove                  -"-
  310.              - strstr & stristr                    -"-
  311.              - strrpl & strirpl                    -"-
  312.              - read & lread                        -"-
  313.              - write & lwrite                      -"-
  314.  
  315.              - Die Funktion calloc() wurde aus der Datei MALLOC.C entfernt
  316.                und in eine eigene Datei verschoben. Bei Nicht-Verwendung von
  317.                calloc() wurde diese bisher trotzdem gelinkt, dies ist jetzt
  318.                nicht mehr der Fall.
  319.  
  320.              - bisher befanden sich die Funktionen open() und close() in der
  321.                selben Datei. Da close() von fclose() aufgerufen wird, und
  322.                diese Funktion wiederum von _main() (wird außer bei ACC's
  323.                immer gelinkt), wurde auch open() immer gelinkt, auch wenn
  324.                sie nicht verwendet wurde. Von dieser Funktion wiederum wurden
  325.                access(), lseek() und creat() gelinkt (IMMER!) ...
  326.  
  327.              - bei Verwendung von cprintf() reicht jetzt (wie bei printf()
  328.                auch) ein einfaches '\n' für ein Newline, da diese Funktion
  329.                jetzt per cputc (siehe unten) ausgibt. Das lästige "\r\n"
  330.                entfällt somit.
  331.                Gleiches gilt für die Funktion cputs().
  332.  
  333.              - für den neuen Optimizer (V2.00x*) wurden die Funktionen
  334.                   strcmp()    strcpy()    strcat()    strlen()
  335.                   strchr()    strrchr()   stricmp()   strlwr()
  336.                   strupr()    strrev()    strpos()
  337.                so umgeschrieben, daß sie schneller (und teilweise länger)
  338.                sind als vorher, und ihre Parameter in Registern anstatt
  339.                auf dem Stack erhalten.
  340.              - die Funktion Ftell() befand sich nicht im Archiv, obwohl der
  341.                Quelltext vorhanden war -- ergänzt
  342.              - es sollte sich jetzt kein Modul mehr in den XDLibs befinden,
  343.                welches eines der Symbole 'gemdos', 'bios' oder 'xbios'
  344.                referenziert. Falls doch, zusätzlich die 'extended.lib'
  345.                linken (nach den XDLIBS) und schon tut's wieder
  346.  
  347. Ebenfalls neu geschrieben wurden:
  348. ----------------------------
  349.    STRTOL   STRTOUL  TOUPPER        TOLOWER     MKDIR    RMDIR    REMOVE
  350.    CHDIR    CLOCK    START_TIMER    TIME_SINCE  CHMOD    WRITE    LWRITE
  351.    READ     LREAD    GETW           GETL        PUTW     PUTL     ACCESS
  352.    FSIZE    STAT
  353. von Holger Weets.
  354.  
  355. Die Funktionen gemdos(), bios() und xbios() wurden aus den Startup's ent-
  356. fernt und unter dem Namen 'ostrap.o' in die XDlibs aufgenommen. Der Grund
  357. hierfür ist, daß der Compiler (HCC) jetzt keine Aufrufe dieser Funktionen
  358. mehr erzeugt, sondern direkt die 'trap' - Instruktionen generiert, was sowohl
  359. kürzer als auch mehr als doppelt so schnell ist.
  360.  
  361. Nach und nach werde ich immer mehr der sonstigen XDLibs - Funktionen neu
  362. übersetzen, damit sie
  363.    a) kürzer werden wegen
  364.       - neuer HCC (traps)
  365.       - neuer TOP (mehr Optimierung)
  366.    b) an den neuen Symbol-Tabellen-Standard (V2.0*) angepasst werden
  367.       (beliebig lange Namen)
  368.  
  369.  
  370. Neu in die DLibs aufgenommen wurden die Funktionen:
  371. ---------------------------------------------------
  372. void (*_userexit)()
  373.    Dieser Zeiger auf eine Funktion kann vom Programm jederzeit mit
  374.    einem Wert belegt werden. Die Funktion exit() prüft diesen Wert
  375.    und falls er nicht 0 ist, wird die Funktion aufgerufen, auf die
  376.    <_userexit> zeigt. Praktisch, um z.B. Dateien noch zu schliessen,
  377.    temporäre Dateien zu löschen oder Vektoren wieder gerade zu biegen.
  378.    exit() wird von main() übrigens automatisch aufgerufen.
  379.  
  380. void ChkAbort()
  381.    Testet, ob Ctrl-C gedrückt wurde und ruft ggfls. exit() auf. Außerdem
  382.    wird die Zeichenkette "^C" auf den Bildschirm ausgegeben.
  383.  
  384. int cputc(char c)
  385.    Das Zeichen <c> wird auf die Console ausgegeben (per Bconout(2, c)).
  386.    Falls das Zeichen '\n' ist, so wird außerdem ein '\r' ausgegeben.
  387.    Diese Funktion wird von cprintf() und cputs() verwendet.
  388.  
  389. char *detab(char *string, int tabsize)
  390.    Alle Tabs in string werden durch Spaces ersetzt, wobei als Tabulator-
  391.    weite tabsize angenommen wird.
  392.  
  393. char *entab(char *string, int tabsize)
  394.    Alle Spaces in string werden durch Tabs ersetzt, wobei als Tabulator-
  395.    weite tabsize angenommen wird.
  396.  
  397. void memswap(char *p1, char *p2, int len)
  398.    Die Speicher-Bereiche ab p1/p2 werden vertauscht, und zwar len Bytes.
  399.  
  400. int strwrap(char *dest, char *src, int len)
  401.    Der String src wird auf eine max. Länge von len gebracht, wobei bei
  402.    Blanks getrennt wird. Dieser Bereich wird nach dest kopiert und aus src
  403.    gelöscht.
  404.    Zurückgegeben wird die neue Länge von src.
  405.  
  406. int strcstrp(char *string, char ch)
  407.    Alle aufeinanderfolgenden Vorkommen von ch in string werden entfernt.
  408.    Beispiel: strcstrp("Hallo       Welt", ' ') wird zu "Hallo Welt".
  409.    Zurückgegeben wird die neue Länge von string.
  410.  
  411. char *strdcat(char *str1, char *str2)
  412.    Alloziiert per malloc() soviel Speicher, wie für die Aufnahme beider
  413.    Strings notwendig ist, und schreibt sie hintereinander in diesen.
  414.  
  415. char *strvcat(anz, dest, src1, src2, ..., srcN)
  416.    Die Strings src1 - scrN werden nacheinander in dest kopiert.
  417.    Beispiel: strvcat(5, p, "Dies ", "ist ", "ein ", "Test"); in <p> stehe
  418.              bereits: "Ausgabe: ";
  419.    ergibt "Ausgabe: Dies ist ein Test"
  420.    Der Parameter anz gibt dabei die Anzahl ALLER noch folgenden Parameter an.
  421.  
  422. char *strvcpy(anz, dest, scr1, scr2, ..., scrN)
  423.    Die Strings src1 - scrN werden nacheinander in dest kopiert.
  424.    Beispiel: strvcat(5, p, "Dies ", "ist ", "ein ", "Test"); in <p> stehe
  425.              bereits: "Ausgabe: ";
  426.    ergibt "Dies ist ein Test" (OHNE "Ausgabe: ", weil überschrieben wird!!!)
  427.    Der Parameter anz gibt dabei die Anzahl ALLER noch folgenden Parameter an.
  428.  
  429. int strblk(char *str, int len)
  430.    Formatiert <str> auf Blocksatz mit Länge <len>.
  431.    Zurückgeliefert wird ein Wert <>0, falls alles geklappt hat
  432.  
  433. char *basename(char *path)
  434.    Liefert einen Zeiger auf das dem letzten Backslash folgende Zeichen.
  435.    Falls <path> also einen Dateinamen enthält, so liefert basename() einen
  436.    Zeiger auf diesen. Falls <path> überhaupt keinen Backslash enthält, so
  437.    liefert die Funktion einen Zeiger auf das erste Zeichen von <path>, also
  438.    wieder einen Zeiger auf den Dateinamen. Falls <path> mit einem Backslash
  439.    endet, wird ein Zeiger auf des Stringende zurückgegeben.
  440.  
  441. char *suffix(char *path)
  442.    Liefert einen Zeiger auf die Endung (Extension, Suffix) des uebergebenen
  443.    Argumentes (Dateiname mit/ohne Pfad). Der Zeiger steht AUF dem '.'
  444.    Falls die Datei keine Endung enthält, steht der Zeiger auf dem String-
  445.    Ende, also dem 0-Zeichen.
  446.  
  447. void cwd(char *path)
  448.    Liefert in <path> den aktuellen Zugriffspfad zurück. Das Ergebnis ist das
  449.    gleiche, wie von getcwd(), bloß
  450.    - ist cwd() kürzer
  451.    - liefert cwd() den Pfad in Großbuchstaben, und nicht, wie getcwd(), in
  452.      Kleinbuchstaben.
  453.  
  454. int index(char *str, char c)
  455.    Wie strpos, aus Kompatibiliäts-Gründen.
  456.  
  457. int rindex(xhr *str, char c)
  458.    Wie strrpos, aus Kompatibiliäts-Gründen.
  459.  
  460. prof.o; Funktionen für das im Compiler eingebaute Profiling; enthält:
  461.    void _prolog(char *name)
  462.       wird am Anfang jeder Funktion aufgerufen, <name> ist der Name der
  463.       Funktion
  464.    void _epilog(char *name)
  465.       wird am Ende jeder Funktion aufgerufen, <name> ist der Name der
  466.       Funktion
  467.    void _savepro()
  468.       wird direkt vor Programm-Ende (von __exit()) aufgerufen und speichert
  469.       die Profiling-Tabelle in einer Datei Namens 'PROF.OUT'. Funktioniert
  470.       nur dann automatisch, wenn der zugehörige Startup-Code verwendet wird
  471.       (prof_s.o).
  472.  
  473.  
  474. Amiga-Version von Christian Wempe
  475. ST-Version von Holger Weets
  476.  
  477.